package hpu.bitenergy.util;

import com.mongodb.BasicDBObject;
import com.mongodb.QueryOperators;
import com.sun.org.apache.bcel.internal.generic.NEW;

public class QueryHelper {
	private static String expert_name = "expert_name";
	private static String author_cn = "author_cn";
	
	public static BasicDBObject expert_name(String name) {
		// 通过专家名得到信息
		BasicDBObject bs = new BasicDBObject(expert_name, name);
		return bs;
	}
	public static BasicDBObject author_cn(String name) {
		// 通过专家名得到信息
		BasicDBObject bs = new BasicDBObject("author_cn", name);
		return bs;
	}

	public static BasicDBObject author_cn(boolean name) {
		//t通过专家找作者
		BasicDBObject bs = new BasicDBObject(author_cn, name);
		return bs;
	}

	public static BasicDBObject getKey(boolean key) {
		//通过专家找关键词
		BasicDBObject bs=new BasicDBObject("key",key);
		return bs;
	}
	public static BasicDBObject gettuijianE(){
		//找出专利最多的前6个专家
		BasicDBObject bs=new BasicDBObject("zhuanli_count",-1);
		return bs;		
	}
	public static BasicDBObject getexpert_name(String research) {
		//全文索引通过关键词专家找
		BasicDBObject bs=new BasicDBObject("$text",new BasicDBObject("$search",research));
		//BasicDBObject bc=new BasicDBObject(bs,new BasicDBObject("expert_name",true));
		return bs;
	}
	
}
